<!DOCTYPE html>
<html>
<head>
    <title>Binding to remote data</title>
    <meta charset="utf-8">
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../styles/kendo.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/kendo.all.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    <div id="example">
    <div class="demo-section k-content">
        <h3>1024x768 screen resolution trends</h3>
        <div id="chart2000" class="small-chart"></div>
        <div id="chart2001" class="small-chart"></div>
        <div id="chart2002" class="small-chart"></div>
        <div id="chart2003" class="small-chart"></div>
        <div id="chart2004" class="small-chart"></div>
        <div id="chart2005" class="small-chart"></div>
        <div id="chart2006" class="small-chart"></div>
        <div id="chart2007" class="small-chart"></div>
        <div id="chart2008" class="small-chart"></div>
        <div id="chart2009" class="small-chart"></div>
    </div>
    <style scoped>    
        .k-chart.small-chart {
            display: inline-block;
            width: 120px;
            height: 120px;
        }
    </style>
    <script>
        function createSmallChart(year) {
                $("#chart" + year).kendoChart({
                        dataSource: {
                            transport: {
                                read: {
                                    url: "../content/dataviz/js/screen_resolution.json",
                                    dataType: "json"
                                }
                            },
                            filter: {
                                field: "year", operator: "eq", value: year
                            },
                            sort: {
                                field: "year",
                                dir: "asc"
                            }
                        },
                        title: {
                            text: year
                        },
                        legend: {
                            position: "top"
                        },
                        seriesDefaults: {
                            type: "pie"
                        },
                        series: [{
                            field: "share",
                            categoryField: "resolution",
                            padding: 0
                        }],
                        tooltip: {
                            visible: true,
                            format: "N0",
                            template: "#= category # - #= kendo.format('{0:P}', percentage)#"
                        }
                });
        }


        function createChart() {
                createSmallChart(2000);
                createSmallChart(2001);
                createSmallChart(2002);
                createSmallChart(2003);
                createSmallChart(2004);
                createSmallChart(2005);
                createSmallChart(2006);
                createSmallChart(2007);
                createSmallChart(2008);
                createSmallChart(2009);
        }

        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
    </script>
</div>


    
    
        <div class='demo-section'>
            <h3>Note:</h3>
            <p>
                Security restrictions prevent this example from working in all browsers when the page is loaded from the file system (via file:// protocol).
                If the demo is not working as expected, please host the Kendo folder on a web server.
            </p>
        </div>
    
</body>
</html>
